package com.smart.community.region.dto;

import java.math.BigDecimal;
import java.time.LocalDate;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;

import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

/**
 * 业主房户关联DTO
 * 
 * @author Wu.Liang
 * @since 2025-08-20
 * @version 1.0.0
 */
@Data
@Schema(description = "业主房户关联DTO")
public class OwnerHouseholdDTO {
    
    @Schema(description = "业主ID")
    private Long ownerId;
    
    @Schema(description = "房户ID")
    private Long householdId;
    
    @Schema(description = "产权类型：1-完全产权，2-共有产权，3-部分产权")
    @NotNull(message = "产权类型不能为空")
    private Integer ownershipType;
    
    @Schema(description = "产权比例（%）")
    @NotNull(message = "产权比例不能为空")
    @DecimalMin(value = "0.01", message = "产权比例不能小于0.01%")
    @DecimalMax(value = "100.00", message = "产权比例不能大于100%")
    private BigDecimal ownershipRatio;
    
    @Schema(description = "产权开始日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate ownershipStartDate;
    
    @Schema(description = "产权结束日期（适用于部分产权）")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate ownershipEndDate;
    
    @Schema(description = "是否主业主：true-是，false-否")
    @NotNull(message = "是否主业主不能为空")
    private Boolean isPrimaryOwner;
    
    @Schema(description = "房产证号")
    private String certificateNumber;
    
    @Schema(description = "房产证日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate certificateDate;
    
    @Schema(description = "抵押信息")
    private String mortgageInfo;
    
    @Schema(description = "备注信息")
    private String remark;
}
